#答案选项

import random

file_axx = open("unit_1_axx_part04.txt", 'w', encoding="utf-8")
file_bxx = open("unit_1_bxx_part04.txt", 'w', encoding="utf-8")
file_cxx = open("unit_1_cxx_part04.txt", 'w', encoding="utf-8")
file_dxx = open("unit_1_dxx_part04.txt", 'w', encoding="utf-8")

list_part_1 = ["spellbind", "spellbinding", "spellbinder", "spellbound", "spellbinds"]
list_part_2 = ["on purpose", "purpose", "with the purpose of", "main purpose"]
list_part_3 = ["go through", "go by", "go up", "go down", "go out"]
list_part_4 = ["in order to", "in order that", "in order", "out of order"]
list_part_5 = ["dusk", "dark", "dusky", "duskiness","at dusk", "at early morning", "at evening"]
list_part_6 = ["thunder", "thundering", "thunderous", "thunderer"]
list_part_7 = ["entirely", "entire", "totally"]


list_answer = [list_part_1,list_part_2,list_part_3,list_part_4,list_part_5,list_part_6,list_part_7]

for i in range(400):
    
    test01 = random.randint(0, 6)
    test02 = random.randint(0, 6)
    test03 = random.randint(0, 6)
    test04 = random.randint(0, 6)

    if test01 != test02 != test03 != test04:
        
        i_1 = random.randint(0, len(list_answer[test01])-1)
        i_2 = random.randint(0, len(list_answer[test02])-1)
        i_3 = random.randint(0, len(list_answer[test03])-1)
        i_4 = random.randint(0, len(list_answer[test04])-1)
        
        file_axx.write("\""+list_answer[test01][i_1]+"\",")
        file_bxx.write("\""+list_answer[test02][i_2]+"\",")
        file_cxx.write("\""+list_answer[test03][i_3]+"\",")
        file_dxx.write("\""+list_answer[test04][i_4]+"\",")
        
file_axx.close()
file_bxx.close()
file_cxx.close()
file_dxx.close()

